SPARSEKIT=/homes/ma67/SPARSKIT2/libskit.a

FC=ifort
FFLAG=-O4 
#OPENMP=-openmp
OPENMP=


MKLROOT=/opt/intel/mkl
#MKL_LIB=-L$(MKLROOT)/lib/intel64  -lmkl_blas95_lp64 -lmkl_lapack95_lp64  -Wl,--start-group  $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -openmp -lpthread
MKL_LIB=

all: cs307 embed

cs307: cs307.o mmio.o 
	$(FC) $(FFLAG) $(OPENMP) -o calculator.exe cs307.o $(SPARSEKIT) mmio.o $(MKL_LIB)
embed: calculator.o mmio.o
	$(FC) $(FFLAG) $(OPENMP) -o calculator.exe calculator.o $(SPARSEKIT) mmio.o $(MKL_LIB)

clean: 
	rm -f *.o *.exe





#=======================================================
.SUFFIXES:
.SUFFIXES: .f90 .f .c .o
.f90.o:
	$(FC) $(FFLAG) $(HEAP) -c  $< 
.f.o:
	$(FC) $(FFLAG) -c  $< 